<img src="{CSSIMG_URL}/common/loading.gif" title="验证码,看不清楚?请点击刷新&#10;字母不区分大小写" alt="" align="absmiddle" id="captchapng" style="cursor:pointer;"/>
<input
	name="captcha"
	id="captcha"
	type="text"
	class="easyui-validatebox"
	size="6"
	data-options="
		required:true,
		missingMessage:'请输入4位长度验证码!',
		invalidMessage:'验证码输入不正确!',
		validType: 'length:[4,4]',
		validType: 'remote[\'{ajaxurl('common/captcha')}\',\'aCaptcha\', \'验证码输入不正确\', 4]'
	"
	style="margin:10px 0 10px 0;"
	/>
<script type="text/javascript">
	seajs.use(['easyui', 'easyui-css'], function(url, utils){
		var $captcha = $('#captcha'),
			$captchapng = $('#captchapng');
		$(function(){
			$captchapng.attr('src', "{url('api/captcha.png', 'action=image')}");
		});
		$captchapng.click(function(){
			$captchapng.attr('src',"{url('api/captcha.png', 'action=image')}"+'&refresh='+Math.random());
			$captcha.val('');
		})
	})
</script>